{include file="public/header" /}



<div class="page">
      <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
       <thead>
           <tr>
               <th colspan="20">基本信息</th>
           </tr>
       </thead>
       <tbody>
            <tr>
              {if $joinin_detail.is_store == 0}
               <th>提交人：</th>
               <td>平台提交</td>
               {/if}
               {if $joinin_detail.is_store != 0}
                <th>用户名：</th>
               <td>{$member_name.member_name}</td>
               {/if}
               <th>申请时间：</th>
               <td>{$joinin_detail.created_at}</td>
               <th>审核状态：</th>
               <td>{$enterprise_status[$joinin_detail['equipment_status']]}</td>
           </tr>
           <tr>
               <th>设备名称</th>
               <td>{$joinin_detail.goods_name}</td>
               <th>分类名称：</th>
               <td>{$joinin_detail.class_name}</td>
               <th>品牌名称：</th>
               <td>{$joinin_detail.b_name}</td>
           </tr>
           <tr>
               <th>规格：</th>
               <td>{$joinin_detail.specifications}</td>
               <th>型号：</th>
               <td>{$joinin_detail.type_model}</td>
           </tr>
       </tbody>
   </table>

   <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
       <thead>
           <tr>
               <th colspan="20">文件信息：</th>
           </tr>
       </thead>
      <tbody>
            <tr>
               <th class="w150">企业营业执照：</th>
               <td><img width="400px" height="300px" src="{$http_name}/{$joinin_detail.equipment_images}" /></td>
           </tr>
       </tbody>
   </table>
</div>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#btn_fail').on('click', function() {
            if($('#joinin_message').val() == '') {
                $('#validation_message').text('请输入审核意见');
                $('#validation_message').show();
                return false;
            } else {
                $('#validation_message').hide();
            }
            layer.confirm("确定要拒绝吗", {
                btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
                title: false,
            }, function () {
                $('#verify_type').val('fail');
                $('#form_store_verify').submit();
            });
        });
        $('#btn_pass').on('click', function() {
            var valid = true;
            $('[dstype="commis_rate"]').each(function(commis_rate) {
                rate = $(this).val();
                if(rate == '') {
                    valid = false;
                    return false;
                }

                var rate = Number($(this).val());
                if(isNaN(rate) || rate < 0 || rate >= 100) {
                    valid = false;
                    return false;
                }
            });
            if(valid) {
                $('#validation_message').hide();
                layer.confirm("确定要审核通过吗", {
                    btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
                    title: false,
                }, function () {
                    $('#verify_type').val('pass');
                    $('#form_store_verify').submit();
                });
            } else {
                $('#validation_message').text('{$Think.lang.store_class_commis_rates_error}');
                $('#validation_message').show();
            }
        });
    });
</script>